<?php

$o = f()->users()->role($param);
if ($o === null) {
	echo 'Unknown role.';
} else {
	$form = f()->users()->role_form('edit');
	$form->load($o);
	if ($form->submitted()) {
		$fields = array('description');
		$form->save($o,$fields);
		$o->save();
		$this->redirect('@user/roles');
	} else {
		$form->render();
	}
}